<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:rich="http://richfaces.org/rich"
                template="layout/template.xhtml">
                       
<ui:define name="body">
    
    <h:messages globalOnly="true" styleClass="message" id="globalMessages"/>
    
    <rich:panel>
        <f:facet name="header">Solicitacao</f:facet>

        <s:decorate id="idtSolicitacao" template="layout/display.xhtml">
            <ui:define name="label">idtSolicitacao</ui:define>
            #{solicitacaoHome.instance.idtSolicitacao}
        </s:decorate>

        <s:decorate id="datSolicitacao" template="layout/display.xhtml">
            <ui:define name="label">datSolicitacao</ui:define>
            <h:outputText value="#{solicitacaoHome.instance.datSolicitacao}">
                <s:convertDateTime type="both" dateStyle="short"/>
            </h:outputText>
        </s:decorate>

        <div style="clear:both"/>
        
    </rich:panel>
    
    <div class="actionButtons">      

        <s:button view="/SolicitacaoEdit.xhtml" 
                    id="edit" 
                 value="Edit"/>

        <s:button view="/#{empty solicitacaoFrom ? 'SolicitacaoList' : solicitacaoFrom}.xhtml"
                    id="done"
                 value="Done"/>

    </div>

    <rich:tabPanel switchType="ajax">

    <rich:tab label="aluno">
    <div class="association" id="alunoParent">
        
        <h:outputText value="No aluno" 
                   rendered="#{solicitacaoHome.instance.aluno == null}"/>
        
        <rich:dataTable var="aluno" 
                   value="#{solicitacaoHome.instance.aluno}" 
                rendered="#{solicitacaoHome.instance.aluno != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="alunoTable">
            <h:column>
                <f:facet name="header">idtAluno</f:facet>
                #{aluno.idtAluno}
            </h:column>
            <h:column>
                <f:facet name="header">numRa</f:facet>
                #{aluno.numRa}
            </h:column>
            <h:column>
                <f:facet name="header">nomAluno</f:facet>
                #{aluno.nomAluno}
            </h:column>
            <h:column>
                <f:facet name="header">numRg</f:facet>
                #{aluno.numRg}
            </h:column>
            <h:column>
                <f:facet name="header">numCpf</f:facet>
                #{aluno.numCpf}
            </h:column>
            <h:column>
                <f:facet name="header">datNascimento</f:facet>
                #{aluno.datNascimento}
            </h:column>
            <h:column>
                <f:facet name="header">action</f:facet>
                <s:link id="viewaluno" 
                     value="View" 
                      view="/Aluno.xhtml">
                    <f:param name="alunoIdtAluno" 
                           value="#{aluno.idtAluno}"/>
                </s:link>
            </h:column>
        </rich:dataTable>
        
    </div>
    </rich:tab>
</rich:tabPanel>
</ui:define>

</ui:composition>
